È«ÃñÕ¨½ð»¨_°ÄÃŵç×ÓÓÎÏ·-appÏÂÔØ

ͼƬ

webshot¥Ñ¥Ã¥±©`¥¸¤òʹ¤Ã¤Æ¡¢R¤Ç¥¦¥§¥Ö¥Ú©`¥¸¤Î¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ÈÈ¡¤ë¤³¤È¤¬¤Ç¤­¤ë¡£

¥Ñ¥Ã¥±©`¥¸¤È¥½¥Õ¥È¤Î¥¤¥ó¥¹¥È©`¥ë(³õ»Ø¤Î¤ß)

webshot¥Ñ¥Ã¥±©`¥¸¤Ç¤ÏPhantomJS¤¬±ØÒª¤Ê¤Î¤Ç¡¢Í¬•r¤Ë¥¤¥ó¥¹¥È©`¥ë¤·¤Æ¤ª¤¯¡£

install.packages("webshot")
install_phantomjs()

»ù±¾µÄ¤Êʹ¤¤·½

webshotévÊý¤Î¥Ø¥ë¥×¤òÒŠ¤ë¤È¶à¤¯¤ÎÒýÊý¤¬¤¢¤ë¤¬¡¢ ±ØÒª×îСÏޤʤΤϥ¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤òÈ¡¤ê¤¿¤¤¥¦¥§¥Ö¤Î¥¢¥É¥ì¥¹url¡£

webshot(url = NULL, file = "webshot.png", vwidth = 992, vheight = 744,
  cliprect = NULL, selector = NULL, expand = NULL, delay = 0.2,
  zoom = 1, eval = NULL)

getwd()¤Ç±íʾ¤µ¤ì¤ë×÷˜I¥Õ¥©¥ë¥ÀÄÚ¤Ëwebshot.png¤È¤¤¤¦¥Õ¥¡¥¤¥ëÃû¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤¬±£´æ¤µ¤ì¤ë¡£

library(webshot)
url <- "http://www.pu-hiroshima.ac.jp/~ttetsuji/"
webshot(url)

cliprect="viewport"¤È¤¹¤ë¤È¡¢vwidth¤Çvheight¤ÇÖ¸¶¨¤·¤¿·ù¤È¸ß¤µ¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ò¤È¤ë¡£

webshot(url,cliprect="viewport",vwidth=800,vheight=100)

cliprect="c(top,left,width,height)"¤È¤¹¤ë¤È¡¢ÉϤ«¤étop×󤫤éleft¤ÎλÖ䫤顢·ùwidth¤Ç¸ß¤µheight¤Î¹ ‡ì¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ò¤È¤ë¡£

webshot(url,cliprect=c(550,150,600,300))